import React from 'react';
import { BrowserRouter as Router,Switch,Route} from 'react-router-dom';
import Start from '../../views/start';
import Register from '../../views/register';
import Login from "../../views/login";
import Success from "../../views/sucess";
import Home from "../../views/home";
import FilterRoute from "../route/filterRoute";


export default class App extends React.Component {
      render() {
            return (
                //有路由就必须被<BrowserRouter>包裹起来
                <Router>
                    <Switch>
                        <div>
                            <Route exact path="/" component={Start} />
                            <Route exact path="/user/register" component={Register}/>
                            <Route path="/user/login" component={Login}/>
                            <Route path="/user/register/success" component={Success}/>
                            <FilterRoute path="/user/index/home" component={Home}/>
                        </div>
                    </Switch>
                </Router>
            )
      }
}

